package cn.scw.project.system.domain;

import cn.scw.framework.aspectj.lang.annotation.Excel;
import cn.scw.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
/**
 * 用户消费记录对象 sys_user_expend
 *
 * @author api
 * @date 2020-05-20
 */
public class SysUserExpend extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 消费类型（押金，充值，续租） */
    @Excel(name = "消费类型", readConverterExp = "押金，充值，续租")
    private String type;

    /** 商品id */
    @Excel(name = "商品id")
    private Long commodityId;

    /** 金额 */
    @Excel(name = "金额")
    private double money;

    /** 是否支付 */
    private boolean isPay;

    /** 创建时间 */
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate=new Date();

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }

    public Long getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Long commodityId) {
        this.commodityId = commodityId;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }

    public boolean isPay() {
        return isPay;
    }

    public void setPay(boolean pay) {
        isPay = pay;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("type", getType())
            .append("commodityId", getCommodityId())
            .append("money", getMoney())
            .append("createDate", getCreateDate())
            .toString();
    }
}
